 <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
 <%
  String articleId=request.getParameter("articleId");
 String path = request.getContextPath();
 String eventIndex=request.getParameter("eventIndex");
%>

<script>
//动态写评论列表div
function setDiv_<%=eventIndex%>(){
	$.ajax({
		 	type:"POST",
		 	url:"<%=path%>/article/articlelist?method=getDiscListByBlogId&bloguuid=<%=articleId%>",
		 	error:function(){
				alert("与服务器失去联系，请刷新本页面后再重试！");
				return;
			},
		 	success:function(data){
		 	  	 initDiscussTable_<%=eventIndex%>(data);
			     $("#DiscussWait_<%=eventIndex%>").hide();
		 	 }
	});
}


function initDiscussTable_<%=eventIndex%>(data){
   $('.discussTr_<%=eventIndex%>').remove();
	data=eval(data);
	var s="";
     for(i=0;i<data.length;i++){
         s+=initDiscussTR_<%=eventIndex%>(data[i]);
     } 
     $("#DiscussWait_<%=eventIndex%>").after(s);  
}

function initDiscussTR_<%=eventIndex%>(message){
    var s="";
        s+="<tr class='discussTr_<%=eventIndex%>'><td height=\"5\" colspan=\"2\"></td></tr>";  
    s+=" <tr class='discussTr_<%=eventIndex%>'><td class=\"lightBlueBold14\" height=\"25\">"+message.ad_personname+"</td>";  
    s+="  <td class=\"greyNormal12\" align=\"right\">"+message.ad_publishtime+"&nbsp;&nbsp;&nbsp;&nbsp;</td>";
   s+=" </tr> <tr class='discussTr'><td colspan=\"2\" class=\"blackNormal14\">";
   s+=message.ad_content+"</td></tr>";

	s+="<tr class='discussTr_<%=eventIndex%>'><td height=\"5\" colspan=\"2\">";
	s+="<div style=\" border-top:1px #cccccc dotted ;margin-left:5px;margin-right:5px;\"></div>";
	s+="</td></tr>";
	
//	s+="<tr class='discussTr'><td height=\"10\"></td></tr>";
//    s+=" <td width=\"10%\" height=\"25\" class=\"blackNormal12\"></td></tr>" ; 
    return s;
}

                
                
</script>
 <table border="0" cellpadding="0" cellspacing="1" width="98%" bgcolor="#666666">
      <tr>
      	<td align="center" bgcolor="#FFFFFF">
        	<table border="0" cellpadding="0" cellspacing="0" width="98%">
            	<tr>
                	<td width="35%" height="30" class="blackBold14"><img src="../images/chart_bar_edit.png">&nbsp;评论
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="greyNormal12">&nbsp;</span></td>
                    <td width="65%" height="30" colspan="2" align="right" class="blackBold14">
                    <table border="0" cellpadding="0" cellspacing="0" width="100">
                        <tr>
                            <td width="100" height="20" bgcolor="f6891f" align="center" style="cursor:hand;">
                                <span style="color:#FFFFFF; font-weight:bold; font-size:12px;">参与评论</span>                            </td>
                        </tr>
                    </table>
                    </td>
                </tr>
                

                
                
                 <tr id="DiscussWait_<%=eventIndex%>"> 
					 <td height="30" colspan="3" style="font-size:12px" align=center><img src="../include/images/loading.gif" /> 加载中……</td>
				  </tr>
  
   
            </table>
            </td>
            </tr>
            </table>
            <script>
               setDiv_<%=eventIndex%>();
            </script>